1. Field of the Invention
The present invention relates to a robot system which utilizes an articulated arm driven by controlling a plurality of joints and a visual sensor, and to a method for controlling the robot system.
2. Description of the Related Art
A conventional robot apparatus is provided with a vertical articulated arm, an end effector (hereinafter referred to as a robot body), a control apparatus for controlling them, and a visual sensor (hereinafter referred to as a camera) attached to the end of the arm. In this robot apparatus, the camera measures a target object, such as a workpiece, the control apparatus calculates the position and orientation of the target object based on the result of the measurement, and, based on the calculated position and orientation of the target object, controls the position and orientation of the robot body.
Generally, the measurement coordinate system for the camera is different from the motion coordinate system for the robot body. Therefore, to acquire a motion target value (command value) of the robot body based on a measurement value of the camera, it is necessary to perform coordinate transformation on the measurement value of the camera from the measurement coordinate system to the motion coordinate system. To perform this coordinate transformation, it is necessary that calibration values (coordinate transformation formula) have been acquired by performing a calibration operation on the measurement coordinate system and the motion coordinate system in advance.
As an example of this calibration operation, a certain method measures, while sequentially changing over a plurality of positions and orientations of a robot body, a reference member for calibration by using a camera at each position and orientation of the robot body. This calibration method is known as the hand-eye calibration method (refer to Japanese Patent Application Laid-Open No. 10-063317, and Hand-Eye Calibration 1 (Radu Horaud and FadiDornaika, 1995)). Based on a relation between the command value to the end of the robot body at each position and orientation of the robot body, and the measurement value of the reference member for calibration from the camera, this method obtains a relation between the motion coordinate system and the measurement coordinate system so that a residual error is minimized, and then acquires calibration values.
With a known method as another example of calibration operation, a camera measures a reference workpiece, and an operator causes a robot body to approach the reference workpiece by using a teaching pendant (refer to Japanese Patent Application Laid-Open No. 6-206186). This method, after the camera measures the reference workpiece, causes the robot body to approach the reference workpiece, obtains a relation between the measurement value obtained by the camera and the command value to the robot body, and acquires calibration values for the measurement coordinate system and the motion coordinate system.
Although the coordinate calibration method discussed in Japanese Patent Application Laid-Open No. 10-063317 does not take a motion error of the robot body into consideration, a motion error is actually generated by a mechanical error and bending on the arm. On the other hand, in an actual operation, the measurement position and orientation of the robot body emphasizing the measurement accuracy at the time of workpiece measurement are largely different from the actual operation position and orientation of the robot body. Since the above-described motion error of the robot body largely depends on the position and orientation of the robot body, it has been difficult to sufficiently improve accuracy even after performing coordinate calibration in the above-described case.
Such position and orientation errors of the robot body can be prevented to a certain extent by using a method in which an operator teaches the actual operation position and orientation to the robot body, as with the coordinate calibration method discussed in Japanese Patent Application Laid-Open No. 6-206186. However, the coordinate calibration method discussed in Japanese Patent Application Laid-Open No. 6-206186 requires a teaching operation by the operator and, therefore, requires a longer operation time for coordinate adjustment than automated operation does. Further, with the relevant method, the accuracy of calibration values may vary depending on the skill level of the operator.